package localdate01;

import java.time.LocalDate;

/*
* LocalDate的判断和计算功能:
*    boolean isLeapYear() //如果当前年份是闰年,返回true,如果是平年返回false
 *                        // 一个年份如果能被 4整除并且不能被100整除   或者  能被400整除
 *   boolean isEqual(ChronoLocalDate other)  // 比较两个日期是否同一天
*
* */
public class LocalDateDemo03 {
    public static void main(String[] args) {
        method01();
        method2();

    }

    private static void method2() {
        LocalDate now2 = LocalDate.now();
        System.out.println(now2.isEqual(now2)); // true

        LocalDate now3 = LocalDate.of(2023, 10, 10);
        System.out.println(now2.isEqual(now3)); // false
    }

    private static void method01() {
        LocalDate now = LocalDate.now();
        System.out.println(now);

        System.out.println(now.isLeapYear()); // true
    }
}
